<#include "/common/common.ftl" encoding="UTF-8">
	<link href="${staticUrl}/css/form.css" type="text/css" rel="stylesheet" />
	<link href="${staticUrl}/js/validate/jquery.validate.css" type="text/css" rel="stylesheet" />
	<script src="${staticUrl}/js/validate/jquery.validate.js" type="text/javascript"></script>
	<script src="${staticUrl}/js/validate/messages_cn.js" type="text/javascript"></script>
	<#assign action="web-site">
	<script>
		$(document).ready(function(){
			//为inputForm注册validate函数
			$("#inputForm").validate();
			$("#channelName").click(function(e){
				previewShow(e);
			});
		});
		function clearCache(){
				$.ajax({url: '${request.contextPath}/security/${action}!clearCache.action?' + new Date().getTime(),
						type: 'GET',dataType: 'html',
						timeout: 30000,
						error: function(){alert('获取模板出错！超时！');    },    
						success: function (data){		
													if(data=="true")
														alert("清理缓存成功！");
													else
														alert("清理缓存失败！" + data);
												}
					});
		}
	</script>
	<style type="text/css">
	<!--
	.articleTitle {
		font-size: 12px;
		width: 80%;
	}
	-->
	</style>	
</head>
<body style="padding-left: 10px ;" scroll="auto">
<div class="title">站点管理</div>
<div class="content">
<form id="inputForm" action="${action}!save.action" method="post">
<input type="hidden" name="id" value="${(id)?if_exists}" />
<table class="content" scroll="auto">
	<tr>
		<@ftlMacro.inputText name="name" descript="网站名称" textShow="${name?if_exists}" cssStyle="required"/>
	</tr>
	<tr>
		<@ftlMacro.inputText name="siteUrl" descript="域名" textShow="${siteUrl?if_exists}"/>
	</tr>
	<tr>
		<@ftlMacro.inputText name="recordCode" descript="备案号" textShow="${recordCode?if_exists}" />
	</tr>
	<tr>
		<@ftlMacro.inputText name="company" descript="所属公司" textShow="${company?if_exists}" />
	</tr>
	<tr>
		<@ftlMacro.inputText name="templatePath" descript="模版地址" textShow="${templatePath?if_exists}" cssStyle="required"/>
	</tr>
	<tr>
		<@ftlMacro.inputText name="staticPath" descript="静态文件url" textShow="${staticPath?if_exists}" cssStyle="required"/>
	</tr>
	<tr>
		<@ftlMacro.inputText name="imgUrl" descript="图片文件url" textShow="${imgUrl?if_exists}" cssStyle="required"/>
	</tr>
	<#if createTime?exists>
	<tr>
		<@ftlMacro.detailText descript="创建时间" textShow="${createTime?if_exists}"/>
	</tr>
	</#if>
	<#if modifyTime?exists>
	<tr>
		<@ftlMacro.detailText descript="修改时间" textShow="${modifyTime?datetime}"/>
	</tr>
	</#if>
	<tr class='button'>
		<td colspan="2">
			<input type="submit" value="提交" />&nbsp; 
			<input type="button" value="清理缓存" onclick="clearCache()"/>
			<input type="button" value="取消" onclick="history.back()"/>
		</td>
	</tr>
	<tr>
		<td colspan="2">
		</td>
	</tr>
</table>
</div>
</form>
</body>
</html>